<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../common/tag.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>阅学网</title>
<meta name="Keywords" content="软件开发、编程、程序员">
<meta name="description" content="Java、C、C++、软件开发、编程、程序员、.NET">
<%@ include file="../common/common.jsp"%>
</head>
<body>
	<jsp:include page="/public/top.jsp"></jsp:include>
	<div class="step-detail" >
		<span><a href="public/index">问答</a>>></span>
	</div>
	<div class="yc_container" style="margin-bottom: 15px;">
			<div class="question-list-left" >
				<div class="question-type">
					<ul>
						<c:forEach items="${questionTypes}" var="questionType">
							<li style="margin-right: 18px;">
								<div class="answer-question-type-list">
										<a href="public/question/questionTypeList/${questionType.id}" title="${questionType.questionTypeName }">${questionType.questionTypeName }</a>
								</div>
							</li>
						</c:forEach>
					</ul>
				</div>
				<div class="answer-content" style="display: block;">
					<div class="answer-question">
						<table>
							<c:forEach items="${questions}" var="question">
								<tr>
									<td style="color: #E7412B;width: 80px;"><img src="images/jifen.png" />&nbsp;&nbsp;${question.questionIntegral}</td>
									<td class="detail" colspan="2"><a href="public/question/detail/${question.id}">${question.questionTitle}</a></td>
									<td class="td-center">(1) 回答</td>
									<td class="td-center"><fmt:formatDate value="${question.createDate}" type="both" pattern="yyyy-MM-dd" /></td>
								</tr>
							</c:forEach>
						</table>
					</div>
				</div>
			</div>
			<div class="page" style="margin-left: 0;width: 720px;">
						 <span><a href="public/question/questionTypeList/${categoryId}?pageNow=1">首页</a></span>
						 <c:choose>
						        <c:when test="${page.pageNow -1 >0}">
						               <span><a href="public/question/questionTypeList/${categoryId}?pageNow=${page.pageNow-1}">上一页</a></span>
						         </c:when>
						   </c:choose>
						    <c:forEach begin="1" end="${page.totalPageCount}" var="pageIndex">
						            <c:choose>
						                  <c:when test="${page.pageNow==pageIndex}">
						                   			<span><a href="javascript:void(0);" style="float: left;background:#EAEAEA; ">${pageIndex }</a></span>
						                   	</c:when>
							                 <c:otherwise>
							                   		<span><a href="public/question/questionTypeList/${categoryId}?pageNow=${pageIndex}" target="_self">${pageIndex }</a></span>
							                 </c:otherwise>
						              </c:choose>
						      </c:forEach>
						      <c:choose>
						             <c:when test="${page.pageNow <page.totalPageCount}">
						                  	<span><a href="public/question/questionTypeList/${categoryId}?pageNow=${page.pageNow+1 }" target="_self">下一页</a></span>
						              </c:when>
						       </c:choose>
						                 <span><a href="public/question/questionTypeList/${categoryId}?pageNow=${page.totalPageCount}">末页</a></span>
					</div>
        </div>
	<jsp:include page="/public/bottom.jsp"></jsp:include>
</body>
</html>
